
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(RCF)

SET(RCF_ROOT ${CMAKE_SOURCE_DIR}/../.. )

IF(NOT BOOST_ROOT)
    SET(BOOST_ROOT C:/boost_1_49_0)
ENDIF()

IF(NOT BIN_PATH)
    SET(BIN_PATH ${CMAKE_SOURCE_DIR}/bin)
ENDIF()

SET(EXECUTABLE_OUTPUT_PATH ${BIN_PATH} )
SET(LIBRARY_OUTPUT_PATH ${BIN_PATH})
LINK_DIRECTORIES( ${BIN_PATH} )

SET(
    RCF_DEFINES
    -DWIN32_LEAN_AND_MEAN
    -DBOOST_ALL_NO_LIB )

SET(
    RCF_INCLUDES 
    ${BOOST_ROOT} 
    ${RCF_ROOT}/include)
    
IF(MINGW)
    SET(RCF_LIBS ws2_32 mswsock crypt32)
ELSEIF(MSVC)
    SET(RCF_LIBS ws2_32)
    IF(CMAKE_CL_64)
        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
    ENDIF()
ELSE()
    SET(RCF_LIBS pthread dl)
ENDIF()


ADD_SUBDIRECTORY(RcfLib)
ADD_SUBDIRECTORY(RcfDll)
ADD_SUBDIRECTORY(Client)
ADD_SUBDIRECTORY(Server)
